package com.ruoyi.common.business.dao;

import com.ruoyi.common.business.entity.YytAttrAttrgroupRelation;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

/**
 * <p>
 * 属性&属性分组关联 Mapper 接口
 * </p>
 *
 * @author huangshun
 * @since 2021-12-16
 */
@Repository
public interface YytAttrAttrgroupRelationMapper extends BaseMapper<YytAttrAttrgroupRelation> {

    /**
     * 根据attrId获取groupId
     */
    @Select("select attr_group_id from yyt_attr_attrgroup_relation where attr_id = #{attrId}")
    String getGroupId(@Param("attrId") String attrId);

}
